Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(REST): dynamic rate limit offsets #10099

Merged
merged 5 commits into from
Jan 30, 2024
Merged

Conversation

didinele
Copy link
Member

Please describe the changes this PR makes and why it should be merged:
Closes #9762

@didinele didinele requested a review from a team as a code owner January 23, 2024 17:23
Copy link

vercel bot commented Jan 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
discord-js ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2024 9:27am
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2024 9:27am

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Attention: 11 lines in your changes are missing coverage. Please review.

Comparison is base (a0c83a2) 58.55% compared to head (20ac451) 58.57%.
Report is 1 commits behind head on main.

Files Patch % Lines
...ackages/rest/src/lib/handlers/SequentialHandler.ts 62.50% 6 Missing ⚠️
packages/rest/src/lib/utils/utils.ts 70.58% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10099      +/-   ##
==========================================
+ Coverage   58.55%   58.57%   +0.01%     
==========================================
  Files         244      244              
  Lines       17281    17309      +28     
  Branches     1248     1250       +2     
==========================================
+ Hits        10119    10138      +19     
- Misses       7117     7126       +9     
  Partials       45       45              
Flag Coverage Δ
next ∅ <ø> (∅)
proxy 75.00% <ø> (ø)
rest 92.58% <73.80%> (-0.29%) ⬇️
ws 52.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@vladfrangu vladfrangu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up for debate if we should maybe make GetRateLimitOffsetFunction async compat or not, I'd say nah, but otherwise LGTM

@Jiralite Jiralite added this to the rest 2.3.0 milestone Jan 24, 2024
@didinele didinele requested a review from ckohen January 24, 2024 11:11
@kodiakhq kodiakhq bot merged commit 278396e into main Jan 30, 2024
7 checks passed
@kodiakhq kodiakhq bot deleted the feat/dynamic-rate-limit-offsets branch January 30, 2024 09:29
Vylpes pushed a commit to Vylpes/card-drop that referenced this pull request May 20, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@discordjs/rest](https://discord.js.org) ([source](https://github.com/discordjs/discord.js)) | dependencies | minor | [`2.2.0` -> `2.3.0`](https://renovatebot.com/diffs/npm/@discordjs%2frest/2.2.0/2.3.0) |

---

### Release Notes

<details>
<summary>discordjs/discord.js (@&#8203;discordjs/rest)</summary>

### [`v2.3.0`](https://github.com/discordjs/discord.js/blob/HEAD/packages/rest/CHANGELOG.md#discordjsrest230---2024-05-04)

[Compare Source](https://github.com/discordjs/discord.js/compare/@discordjs/[email protected]...@discordjs/[email protected])

#### Bug Fixes

-   Anchor link for events ([0efd1be](discordjs/discord.js@0efd1be))

#### Documentation

-   Split docs.api.json into multiple json files ([597340f](discordjs/discord.js@597340f))
-   Remove hyphen after `@returns` ([#&#8203;9989](discordjs/discord.js#9989)) ([e9ff991](discordjs/discord.js@e9ff991))

#### Features

-   Local and preview detection ([79fbda3](discordjs/discord.js@79fbda3))
-   **REST:** Dynamic rate limit offsets ([#&#8203;10099](discordjs/discord.js#10099)) ([278396e](discordjs/discord.js@278396e))

#### Refactor

-   Docs ([#&#8203;10126](discordjs/discord.js#10126)) ([18cce83](discordjs/discord.js@18cce83))
-   Use interfaces for AsyncEventEmitter event maps ([#&#8203;10044](discordjs/discord.js#10044)) ([adfd9cd](discordjs/discord.js@adfd9cd))

#### Styling

-   Fix up lint ([d869d9b](discordjs/discord.js@d869d9b))

#### Testing

-   Skip flaky rest test ([#&#8203;10234](discordjs/discord.js#10234)) ([dc8f149](discordjs/discord.js@dc8f149))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://git.vylpes.xyz/External/card-drop/pulls/232
Reviewed-by: Vylpes <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Vylpes pushed a commit to Vylpes/vylbot-app that referenced this pull request Jun 25, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@discordjs/rest](https://discord.js.org) ([source](https://github.com/discordjs/discord.js)) | dependencies | minor | [`2.2.0` -> `2.3.0`](https://renovatebot.com/diffs/npm/@discordjs%2frest/2.2.0/2.3.0) |

---

### Release Notes

<details>
<summary>discordjs/discord.js (@&#8203;discordjs/rest)</summary>

### [`v2.3.0`](https://github.com/discordjs/discord.js/blob/HEAD/packages/rest/CHANGELOG.md#discordjsrest230---2024-05-04)

[Compare Source](https://github.com/discordjs/discord.js/compare/@discordjs/[email protected]...@discordjs/[email protected])

#### Bug Fixes

-   Anchor link for events ([0efd1be](discordjs/discord.js@0efd1be))

#### Documentation

-   Split docs.api.json into multiple json files ([597340f](discordjs/discord.js@597340f))
-   Remove hyphen after `@returns` ([#&#8203;9989](discordjs/discord.js#9989)) ([e9ff991](discordjs/discord.js@e9ff991))

#### Features

-   Local and preview detection ([79fbda3](discordjs/discord.js@79fbda3))
-   **REST:** Dynamic rate limit offsets ([#&#8203;10099](discordjs/discord.js#10099)) ([278396e](discordjs/discord.js@278396e))

#### Refactor

-   Docs ([#&#8203;10126](discordjs/discord.js#10126)) ([18cce83](discordjs/discord.js@18cce83))
-   Use interfaces for AsyncEventEmitter event maps ([#&#8203;10044](discordjs/discord.js#10044)) ([adfd9cd](discordjs/discord.js@adfd9cd))

#### Styling

-   Fix up lint ([d869d9b](discordjs/discord.js@d869d9b))

#### Testing

-   Skip flaky rest test ([#&#8203;10234](discordjs/discord.js#10234)) ([dc8f149](discordjs/discord.js@dc8f149))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjAiLCJ0YXJnZXRCcmFuY2giOiJkZXZlbG9wIn0=-->

Reviewed-on: https://git.vylpes.xyz/RabbitLabs/vylbot-app/pulls/435
Reviewed-by: Vylpes <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Custom REST rate limit offsets for specific routes
4 participants